package automateWebElements;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

import java.util.List;

public class CheckBoxes {
    public static void main(String[] args) {
        FirefoxDriver driver = new FirefoxDriver();
        driver.get("https://rahulshettyacademy.com/dropdownsPractise/");
        System.out.println(driver.findElementByCssSelector("input[id*='SeniorCitizenDiscount']").isSelected());
        driver.findElementByCssSelector("input[id*='SeniorCitizenDiscount']").click();
        System.out.println(driver.findElementByCssSelector("input[id*='SeniorCitizenDiscount']").isSelected());

        //nr of all checkboxes
        System.out.println("NR of checkboxes on site : "+driver.findElementsByCssSelector("input[type='checkbox']").size());

    }
}
